import request from '@/utils/request'

// 查询追责记录列表
export function listPunishment(query) {
	return request({
		url: '/spm/punishment/list',
		method: 'get',
		params: query
	})
}

// 查询追责记录详细
export function getPunishment(punishmentId) {
	return request({
		url: '/spm/punishment/' + punishmentId,
		method: 'get'
	})
}

// 新增追责记录
export function addPunishment(data) {
	return request({
		url: '/spm/punishment',
		method: 'post',
		data: data
	})
}

// 修改追责记录
export function updatePunishment(data) {
	return request({
		url: '/spm/punishment',
		method: 'put',
		data: data
	})
}

// 删除追责记录
export function delPunishment(punishmentId) {
	return request({
		url: '/spm/punishment/' + punishmentId,
		method: 'delete'
	})
}